package com.go.where.family.service.impl;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.CustomerClientDao;
import com.go.where.family.pojo.CustomerClientInfo;
import com.go.where.family.scoket.Head;
import com.go.where.family.service.CustomerClientService;

@Service("customerClientService")
public class CustomerClientServiceImpl implements CustomerClientService {

	@Resource(name = "customerClientDao")
	private CustomerClientDao customerClientDao;

	@Override
	public int update(CustomerClientInfo customerClientInfo, Head head) {
		customerClientInfo.setUpdateTime(new Date());
		return this.customerClientDao.update(customerClientInfo);
	}

	@Override
	public int save(CustomerClientInfo customerClientInfo, Head head) {
		customerClientInfo.setInsertTime(new Date());
		return this.customerClientDao.insert(customerClientInfo);
	}

	@Override
	public CustomerClientInfo queryByPrimaryKey(String customerId) {
		return this.customerClientDao.queryByPrimaryKey(customerId);

	}

}
